{{define "title"}}LUCI Scheduler :: {{.ProjectID}}{{end}}

{{define "head"}}
<style type="text/css">
#jobs-table {
  table-layout: fixed;
}
#jobs-table td.long {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
</style>
{{template "job-action-scripts" .}}
{{end}}

{{define "content"}}

<ol class="breadcrumb">
  <li class="breadcrumb-item"><a href="/">All projects</a></li>
  <li class="breadcrumb-item active">{{.ProjectID}}</li>
</ol>

<div class="container">
  <div class="row">
    <div class="col-sm-12">
      {{if not .Jobs}}
      <p>
        No jobs in this project or no READER permission to view them.
        {{if .IsAnonymous}}
        You may need to <a href="{{.LoginURL}}">login</a> first.
        {{end}}
      </p>
      {{else}}
      <table class="table" id="jobs-table">
        <thead>
          <tr>
            <th style="width: 350px;">Job</th>
            <th style="width: 250px;">Schedule</th>
            <th style="width: 120px;">State</th>
            <th>Next run</th>
            <th>Actions</th>
          </tr>
        </thead>
        <tbody>
        {{range .Jobs }}
          <tr>
            <td class="long">{{template "job-id-ref" .}}</td>
            <td>{{.Schedule}}</td>
            <td><span class="label {{.LabelClass}}">{{.State}}</span></td>
            <td class="long">{{.NextRun}}</td>
            <td>{{template "job-action-buttons" .}}</td>
          </tr>
        {{end}}
        </tbody>
      </table>
      {{end}}
    </div>
  </div>
</div>

{{end}}
